# -*- coding: utf-8 -*-
def do_upgrade(env, cursor):
    
    try:
        cursor.execute("ALTER TABLE forum ADD viewcount int(11) default 0")
        cursor.execute("ALTER TABLE topic ADD viewcount int(11) default 0")
        cursor.execute("UPDATE system SET value = '6' WHERE name = 'discussion_version'")
    except:
        pass
        # it seems that those columns already existed